#include "starter.h"
#include "parser.hpp"
using namespace std;

std::ostringstream buffer;
Starter::Starter(){
}

Starter::Starter(string fileName){
    my_file = fileName;
}



Starter::~Starter(){
}

int Starter::parse(){
    m_loc.initialize(&m_file);
    s_begin(); // 初始化词法分析器
    yy::parser parser(*this);
    parser.set_debug_level(false);
    int res = parser.parse();

    s_end();
    return res;
}